﻿using System.Collections.Generic;
using WikiPlex.Compilation;
using WikiPlex.Compilation.Macros;
using WikiPlex;

namespace MvcCms.Service.Code.Wiki
{
    public class TextSizeMacro : IMacro
    {
        public string Id
        {
            get { return "Text Size"; }
        }

        public IList<MacroRule> Rules
        {
            get
            {
               return new List<MacroRule>
               {
                   new MacroRule(EscapeRegexPatterns.CurlyBraceEscape),
                   new MacroRule(@"(?i)(\[size:)([^\]]+)(\])",
                                 new Dictionary<int, string>
                                 {
                                     {1, ScopeName.Remove},
                                     {2, WikiScopeName.WikiTextSize},
                                     {3, ScopeName.Remove}
                                 }
                       )
               };
            }
        }
    }
}